package com.qf.zhijia.service.impl;

import com.qf.zhijia.mapper.ThemeMapper;
import com.qf.zhijia.pojo.Product;
import com.qf.zhijia.service.ThemeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author 岳鹏
 * @Date 2020/9/7
 */
@Service
public class ThemeServiceImpl implements ThemeService {

    @Autowired
    ThemeMapper themeMapper;

    /**
     * 通过主题ID，展示主题中的商品和商品二级类；需要排序
     * @return
     */
    @Override
    public List<Product> findAllProduct(Integer themeId,Integer sort) {
        List<Product> productList = themeMapper.selectProductByThemeId(themeId,sort);
        return productList;
    }
}
